package com.sohoometer.station.services;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;

import org.hibernate.Criteria;
import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.loader.criteria.CriteriaLoader;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.nari.coreframe.service.GenericServiceImpl;
import com.sohoometer.station.bean.PowerMeterInfo;
import com.sohoometer.station.dao.PowerMeterInfoDao;

@Service("powerMeterInfoService")
public class PowerMeterInfoServiceImpl extends
		GenericServiceImpl<PowerMeterInfo, String> implements PowerMeterInfoService {
	@Autowired
	private PowerMeterInfoDao powerMeterInfoDao;
	@Autowired
	public PowerMeterInfoServiceImpl(PowerMeterInfoDao powerMeterInfoDao) {
		setiGenericDao(powerMeterInfoDao);
		this.powerMeterInfoDao = powerMeterInfoDao;
	}
	@Override
	public List<PowerMeterInfo> queryPowerInfoByUserId(String id) throws Exception {
		return	powerMeterInfoDao.queryPowerInfoByUserId(id);
	}
}
